package org.csu.forum.domain.VO;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.csu.forum.domain.PO.*;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Data
@Component

public class AllPostContentVO implements Serializable {

    @JsonIgnore
    private UserSendPost userSendPost;

    @JsonIgnore
    private Post post;

    @JsonIgnore
    private Files files;

    @JsonIgnore
    private Followpost followpost;

    @JsonIgnore
    private Titlepost titlepost;

    private int userid;

    private int postid;

    private String content;

    private int fileid;

    private int zoneid;

    private int sectionid;

    @JsonIgnore
    private int fileId;

    private String fileDescription;

    private String filesrc;

    private int titlepostId;

    private int followpostId;

    private int followpostFloor;

    private String titlepostcontent;

    @JsonIgnore
    private Boolean istop;

    @JsonIgnore
    private Boolean isesscence;

    @JsonIgnore
    private Boolean isreport;

    @JsonIgnore
    private Boolean isvote;

    public AllPostContentVO(){
        this.userSendPost = new UserSendPost();
        this.post = new Post();
        this.files = new Files();
        this.followpost = new Followpost();
        this.titlepost = new Titlepost();
    }

    public UserSendPost getUserSendPost(){return userSendPost;}

    public void setUserSendPost(UserSendPost userSendPost){this.userSendPost = userSendPost;}

    public Post getPost(){return post;}

    public void setPost(Post post){this.post = post;}

    public Files getFiles(){return files;}

    public void setFiles(Files files){this.files = files;}

    public Followpost getFollowpost(){return followpost;}

    public void setFollowpost(Followpost followpost){this.followpost = followpost;}

    public Titlepost getTitlepost(){return titlepost;}

    public void setTitlepost(Titlepost titlepost){this.titlepost = titlepost;}

    public void setParameter(){

        this.content = this.post.getContent();
        this.fileid = this.post.getFileid();
        this.zoneid = this.post.getZoneid();
        this.userid = this.userSendPost.getUserid();
        this.postid = this.userSendPost.getPostid();
        this.fileId = this.post.getFileid();
        this.fileDescription = this.files.getFileDescription();
        this.filesrc = this.files.getFilesrc();
        this.titlepostId = this.followpost.getTitlepostId();
        this.followpostId = this.followpost.getFollowpostId();
        this.followpostFloor = this.followpost.getFollowpostFloor();
        this.titlepostcontent = this.titlepost.getContent();
        this.istop = this.titlepost.getIstop();
        this.isesscence = this.titlepost.getIsesscence();
        this.isreport = this.titlepost.getIsreport();
        this.isvote = this.titlepost.getIsvote();
        this.sectionid =this.post.getSectionid();

    }

}
